<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meat name="viewpoet" content="with=device-width, initial-scale=1.0">
        <title>Document</title>
</head>

<body>
    <div id="app">
        <button v-show="index > 0" @click="index--">上一页</button>
        <div>
            <img v-bind:src="list[index]" alt="" :style="{width: imageWidth + 'px',height: imageHeight + 'px'}">
        </div>
        <button v-show="index < list.length-1" @click="index++">下一页</button>
    </div>
    <!-- 引入的是开发版本包 - 包含完整的注释和警告 -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2.7.16/dist/vue.js"></script>
    <script>
        const app = new Vue({
            el: '#app',
            data: {
                index: 0,
                list: [
                    './img/01.jpg',
                    './img/02.jpg',
                    './img/03.jpg',
                    './img/04.jpg',
                    './img/05.jpg',
                    './img/06.jpg',
                    './img/07.jpg'
                ],
                imageWidth: 200,
                imageHeight: 200
            }
        })
    </script>

</body>

</html>